"""表TestReport修改字段pass_rate为string类型

Revision ID: 6a946846f99a
Revises: 8b10ba2b7ab5
Create Date: 2024-01-08 16:43:52.403220

"""
from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql

# revision identifiers, used by Alembic.
revision: str = '6a946846f99a'
down_revision: Union[str, None] = '8b10ba2b7ab5'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column('testreport', 'pass_rate',
               existing_type=mysql.FLOAT(),
               type_=sa.String(length=10),
               existing_comment='测试通过率',
               existing_nullable=True)
    # ### end Alembic commands ###


def downgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column('testreport', 'pass_rate',
               existing_type=sa.String(length=10),
               type_=mysql.FLOAT(),
               existing_comment='测试通过率',
               existing_nullable=True)
    # ### end Alembic commands ###
